lectures.alex.balgavy.eu

Lecture notes from university.
git clone git://git.alex.balgavy.eu/lectures.alex.balgavy.eu.git
Log | Files | Refs | Submodules

Memory locations & addresses.md (880B)


      1 +++
      2 title = 'Memory locations & addresses'
      3 +++
      4 # Memory locations & addresses
      5 memory has storage cells, each for one bit
      6 
      7 bits are handled in groups — words
      8 
      9 modern word length — 32 or 64 bits
     10 
     11 32-bit can store four ASCII characters or 32-bit signed number in one word (4 bytes)
     12 
     13 to retrieve a single item of info, an address is used
     14 
     15 successive addresses refer to successive byte locations in memory (byte-addressable memory)
     16 
     17 in a 32-bit processor, words are located at addresses {0, 4, 8, …}
     18 
     19 two ways of assignment across words:
     20 
     21 - big-endian: lower byte addresses are used for more significant (leftmost) bytes of the word (the end bit has the biggest address)
     22 - little-endian: lower byte addresses are used for less significant bytes (the end bit has the lowest address)
     23 
     24 alignment — if words begin at byte addresses that are a multiple of the byte length of a word